package com.site.dao;

import com.site.pojo.OutStock;

import java.sql.Connection;
import java.util.List;

/**
 * 出库表类DAO
 */
public interface OutStockDao {
    //查询所有出库单
    List<OutStock> selectAll();

    //通过id查询出库单
    OutStock selectByoid(Long oid);

    //通过出库单编号查询出库单
    OutStock selectByOutStockNumber(String outStockNumber);

    //无事务，新增出库单
    int addOutStock(OutStock outStock);

    //有事务，新增出库单
    int addOutStock(Connection conn, OutStock outStock);

    //无事务，通过id删除出库单
    int deleteOutStockByoid(Long oid);

    //有事务，通过id删除出库单
    int deleteOutStockByoid(Connection conn,Long oid);

    //无事务，通过出库单编号删除出库单
    int deleteOutStockByNumber(String number);

    //有事务，通过出库单编号删除出库单
    int deleteOutStockByNumber(Connection conn,String number);

    //无事务，通过outStock修改出库单
    int updateOutStock(OutStock outStock);

    //有事务，通过outStock.id修改出库单
    int updateOutStock(Connection conn,OutStock outStock);
}
